<template>
  <view class="food-card">
    <view class="container">
      <!-- <view class="food-photo">
        <image :src="src" mode="aspectFill" />
      </view>
      <view class="food-info">
        <text>名称：{{title}}</text>
        <view class="food-remark">
          <text>评分：</text>
          <uni-rate :readonly="true" size="14" v-model="remark" />
        </view>
        <text>坐标：{{position}}</text>
        <text>描述：{{description}}</text>
      </view> -->
      <view class="view_tupian_wenzi">
				<image class="image_1" :src="item.photo" mode="aspectFill"/>
				<view class="view_wenzi2">
					<text class="food-name">{{item.name}}</text>
					<view class="food-remark">
						<uni-rate :readonly="true" size="14" v-model="item.score" />
					</view>
					<text class="food-address">坐标：{{item.schoolName+' '+item.address}}</text>
					<text class="food-description">描述：{{item.description}}</text>
				</view>
			</view>
    </view>
  </view>
</template>

<script>
import {uniRate} from '@dcloudio/uni-ui'
export default {
  name: 'food-card',
  components: {
    uniRate
  },
  props: ['item']
}
</script>

<style lang='scss'>
  .food-card {
    margin: 30rpx 30rpx;
    .container {
      border-bottom: 1px dotted #f5f5f5;
      display: flex;
    //   height: 250rpx;
      justify-content: space-between;
			.view_tupian_wenzi {
				display: flex;
				flex-direction: row;
				margin-left: 10px
			}
			.image_1 {
				width: 250rpx;
        height: 100px;
        border-radius: 10px;
			}
			.view_wenzi2 {
				width: 400rpx;
				margin-left: 5px;
				display: flex;
				flex-direction: column;
				padding-bottom: 10px;
				text {
		// 			display: -webkit-box;
		// 			-webkit-box-orient: vertical;
		// 			-webkit-line-clamp: 2;
        //   overflow: hidden;
          padding-left: 10px;
          padding-bottom: 5px;
        }
        .food-name {
          font-size: 16px;
          color: #333333;
        }
				.food-address {
       	  padding-top: 5px;
          font-size: 14px;
          color: #666666;
        }
        .food-description {
          font-size: 12px;
          color: #999999;
        }
	}
      .food-photo {
        height: 120px;
        width: 30%;
        image {
          height: 100%;
          width: 100%;
        }
      }
      .food-info {
        .food-remark {
          display: flex;
          flex-direction: row;
        }
        margin-left: 10rpx;
        height: 200rpx;
        width: 70%;
        text {
          display: block;
        }
      }
    }
  }
  /* 头条小程序组件内不能引入字体 */
	/* #ifdef MP-BAIDU */
	@font-face {
		font-family: uniicons;
		font-weight: normal;
		font-style: normal;
		src: url("~@/static/uni.ttf") format("truetype");
	}
	/* #endif */
</style>
